/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.edu.upc.dew.egretel.controller;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import pe.edu.upc.dew.egretel.model.Persona;
import pe.edu.upc.dew.egretel.service.PersonaService;
import pe.edu.upc.dew.egretel.service.PersonaServiceImpl;

/**
 *
 * @author Luis Tantaruna
 */
public class RegistraReclamoServlet extends HttpServlet {

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        // Recuperamos datos del view
        String login = req.getParameter("login");

        // Llamar al model
        PersonaService personaService = new PersonaServiceImpl();

        Persona persona = personaService.logeo(login, "");

        // Setear el model para el view
        req.setAttribute("persona", persona);

        req.getRequestDispatcher("RegistraReclamo_Cliente.jsp").forward(req, resp);

    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp)
            throws ServletException, IOException {
    }
}
